/*
 *
 *
 *
 *
 */

package com.usefullc.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.usefullc.system.entity.BaseEntity;
import com.usefullc.system.service.component.extend.DictField;
import com.usefullc.system.validator.UsefulPropertyVerify;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 数据字典，可以多级，可包含枚举特征
 */
@ApiModel("字典")
@TableName("sys_data_dict")
@Data
public class DataDict extends BaseEntity {


    @ApiModelProperty(notes = "编码--字典关系唯一值")
    private String code;

    @UsefulPropertyVerify(minLen = 1,maxLen = 50)
    @ApiModelProperty(notes = "应用")
    private String appName;

    @UsefulPropertyVerify
    @ApiModelProperty(notes = "租户ID")
    private Long tenantId;


    @UsefulPropertyVerify(required = true,minLen = 1,maxLen = 50)
    @ApiModelProperty(notes = "名称--字典")
    private String name;

    @UsefulPropertyVerify(required = true,minLen = 1,maxLen = 50)
    @ApiModelProperty(notes = "值--字典值")
    private String value;

    @UsefulPropertyVerify
//    @DictField(value="dataDictType")
    @ApiModelProperty(notes = "数据类型")
    private Integer type;


    @UsefulPropertyVerify(required = true)
    @ApiModelProperty(notes = "父ID")
    private Long parentId;

    @UsefulPropertyVerify(required = true,min = 1)
    @ApiModelProperty(notes = "序号")
    private Integer orderNo;

    @UsefulPropertyVerify(minLen = 1,maxLen = 500)
    @ApiModelProperty(notes = "描述")
    private String description;

    public DataDict(){
    }


}
